package com.westos.controller;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class SpringListener implements ServletContextListener {
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        System.out.println("在servlet容器启动时会自动调用");
        SpringUtil.getInstance();
    }

    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        System.out.println("在servlet容器关闭时会自动调用");
    }
}